import { createApp } from 'vue'
import App from '@/App.vue'
// 引入element-plus插件与样式
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
//@ts-ignore忽略当前文件ts类型的检测否则有红色提示(打包会失败)
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
// svg插件需要配置代码
import 'virtual:svg-icons-register'

// 引入自定义插件对象:注册整个项目全局组件
import globalComponent from '@/components'

import '@/styles/index.scss'

import router from './router'

//引入仓库
import pinia from './store'
import './permission'

// 获取应用实例对象
const app = createApp(App)

app.use(ElementPlus, {
  locale: zhCn,
})

app.use(globalComponent)
app.use(router)
app.use(pinia)

// console.log(globalComponent);

// 将应用挂载app节点上
app.mount('#app')

// 获取环境变量
// console.log(import.meta.env)
